/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Model;

/**
 *
 * @author Oscar
 */
public class User {

    private String Nickname;
    private String Password;

    public User() {
    }

    public User(String name, String password) {

        this.Nickname = name;
        this.Password = password;
    }

    /**
     * Convierte a JSON una instancia de la clase
     *
     * @return
     */
    public String toJson() {
            return "{ \"user\" [ \"Nickname\": \"" + Nickname + "\"},"
                    + " \"Password\": \"" + Password + "\"] }";
    }

    /**
     * Convierte a String una instancia de la clase
     *
     * @return
     */
    @Override
    public String toString() {
            return "user [name = " + Nickname + ","
                    + " ip = " + Password + "]";
    }

    public String getNickname() {
            return Nickname;
    }

    public void setNickname(String name) {
            this.Nickname = name;
    }

    public String getPassword() {
            return Password;
    }

    public void setPassword(String ip) {
            this.Password = ip;
    }

}
